package com.yidu.best.stock.stockQuotation.util;

import java.util.UUID;

/**
 * ID鐢熸垚鍣�
 * @author JLM
 *
 */
public class IDGenerator {

	public static void main(String[] args) {
		String uuid = UUID.randomUUID()
				.toString()
				.replace("-", "")
				.toUpperCase()
				.substring(0, 16);
		
		System.out.println(uuid);
	}
	
	/**
	 * 鑾峰緱ID
	 * @return 杩斿洖涓嶉噸澶嶇殑16浣嶅瓧绗︿覆
	 */
	public static String getId(){
		return UUID.randomUUID()   //鑾峰彇UUID
				.toString() //杞负瀛楃涓�
				.replace("-", "") //鍘婚櫎涓棿 -
				.toUpperCase() //杞负澶у啓
				.substring(0, 16); //鍙栧墠闈�16涓瓧绗�
	}
}
	